package com.example.lvsuo.service.cxg.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.lvsuo.entity.cxg.vo.AdmArticlesVo;
import com.example.lvsuo.mapper.cxg.AdmArticlesMapper;
import com.example.lvsuo.service.cxg.AdmArticlesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class AdmArticlesServiceImpl implements AdmArticlesService {

    @Autowired
    AdmArticlesMapper admArticlesMapper;


    @Override
    public List<AdmArticlesVo> getAdmArticles( AdmArticlesVo admArticlesVo) {
        return admArticlesMapper.getAdmArticles(admArticlesVo);
    }

    @Override
    public int addAdmArticles(AdmArticlesVo admArticlesVo) {

        admArticlesMapper.addAdmArticles(admArticlesVo);

         int id = admArticlesMapper.getId();

        return id;
    }
}
